-- GENERATED SPELL FOR [Stormforged Sentinel] --


function spell0_28837(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(34423,pUnit)
pUnit:RegisterEvent('Sorts_28837', 15000, 1)
end

function spell1_28837(pUnit, Event) --@Renew,Heal--
pUnit:FullCastSpellOnTarget(37978,pUnit)
pUnit:RegisterEvent('Sorts_28837', 15000, 1)
end

function spell2_28837(pUnit, Event) --@Sleep,n/a--
pUnit:FullCastSpellOnTarget(53045,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28837', 4286, 1)
end

function spell3_28837(pUnit, Event) --@Sleep,n/a--
pUnit:FullCastSpellOnTarget(59165,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28837', 5258, 1)
end

function spell4_28837(pUnit, Event) --@Storming Bellow,Self--
pUnit:FullCastSpellOnTarget(53047,pUnit)
pUnit:RegisterEvent('Sorts_28837', 10260, 1)
end

function Sorts_28837(pUnit, Event)
local choix_sorts_28837 = math.random(0, 4)
if choix_sorts_28837 == 0 then
pUnit:RegisterEvent('spell0_28837', 1, 1)
end
if choix_sorts_28837 == 1 then
pUnit:RegisterEvent('spell1_28837', 1, 1)
end
if choix_sorts_28837 == 2 then
pUnit:RegisterEvent('spell2_28837', 1, 1)
end
if choix_sorts_28837 == 3 then
pUnit:RegisterEvent('spell3_28837', 1, 1)
end
if choix_sorts_28837 == 4 then
pUnit:RegisterEvent('spell4_28837', 1, 1)
end
end

function mob28837_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28837', math.random(1500, 3000), 1)
end

function mob28837_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28837_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28837_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28837, 1, 'mob28837_Action')
RegisterUnitEvent(28837, 2, 'mob28837_Leave')
RegisterUnitEvent(28837, 3, 'mob28837_Kill')
RegisterUnitEvent(28837, 4, 'mob28837_Die')
